#!/bin/bash

CurrentDir=`basename $PWD`
DATE=$(date +%Y-%m-%d)
TARBALLNAME="TodayWorkBackUp_${CurrentDir}_${DATE}.tar.gz"

echo $CurrentDir
echo $DATE
echo $TARBALLNAME


find . -name '*.c'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.cc'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.cpp'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.h'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.hpp'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.java'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.go'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.gn'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
find . -name '*.gni'  	-type f -mtime -2 | xargs tar -rvf $TARBALLNAME
